<?php $this->pageTitle = 'Account Registration'; ?>
<div id="identify-wrapper" class="bg-sky bg-position-bottom">
    <div class="container_12 relative">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'quickregister-form',
            'enableAjaxValidation' => false,
            'htmlOptions' => array(
                'class' => 'form',
            )
                ));
        ?>

        <?php echo $form->errorSummary(array($user)); ?>
        <div class="grid_8">
            <div id="account-identify-left">
                <div class="banner">
                    <h3 class="pad15-x pad10-y">Power Up Your Real Estate Business in <span class="green">30 seconds</span></h3>
                </div>
                <div class="contents pad15-x pad10-y">
                    <h4><span class="step">STEP 2 of 2:</span> Account Registration</h4>
                    <p>
                        Your account details have been pre-populated for you from our database. <br/>
                        Please fill in the form to complete your registration.
                    </p>

                    <table class="table">
                        <tbody>
                            <tr>
                                <td width="135" class="align-right" width="25%"><label>CEA License No: </label></td>
                                <td><strong><?php echo $user->license_no; ?></strong></td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right">Name: </td>
                                <td><?php echo $user->name; ?></td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right">Agency: </strong></td>
                                <td>
                                    <?php
                                    $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
                                        'model' => $user,
                                        'attribute' => 'agency',
                                        'source' => $this->createUrl('/ajax/agency/autocomplete'),
                                        // additional javascript options for the autocomplete plugin
                                        'options' => array(
                                            'showAnim' => 'fold',
                                            'select' => 'js:function(event, ui){
                                           $("#' . CHtml::activeId($user, 'agency_id') . '").val(ui.item["agency_id"]);
                                        }'
                                        ),
                                        'htmlOptions' => array(
                                            'size' => '40'
                                        )
                                    ));
                                    ?>
                                    <?php echo $form->hiddenField($user, 'agency_id'); ?>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right"><label>NRIC:</label></td>
                                <td><?php echo $form->textField($user, 'nric', array('size' => '20')); ?></td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right"><label>Email:</label></td>
                                <td><?php echo $form->textField($user, 'email', array('size' => '20')); ?></td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right"><label>Mobile Number:</label></td>
                                <td><?php echo $form->textField($user, 'mobile', array('size' => '20')); ?></td>
                            </tr>
                            <tr>
                                <td width="135" class="align-right"><label>Password:</label></td>
                                <td><?php echo $form->passwordField($user, 'password', array('size' => '20')); ?></td>
                            </tr>
                        </tbody>
                    </table>
                    <hr/>
                    <p>By clicking <strong>Create my Free Account</strong> you agree to the <a href="/terms.html">Terms of Use</a> and <a href="/privacy.html">Privacy</a> policies.</p>
                    <p><?php echo CHtml::submitButton('Create my Free Account', array('class' => 'orange-button')); ?></p>                    
                </div>
            </div>
        </div>
        <div  id="account-identify-right" class="grid_4">
            <?php $this->renderPartial('_testimonials', array('referrer' => $referrer)); ?>
        </div>
        <?php $this->endWidget(); ?>
    </div>
</div>